﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BricksProblemSolver.Solution1
{
    public class Solver1 : Solver<BrickRow1>
    {
        public Solver1(int maxLength, int maxHeight, sbyte[] brickTypes, ILog log)
            : base(maxLength, maxHeight, brickTypes, log)
        {

        }

        protected override BrickRow1 CreateRow()
        {
            var maxBrickCount =
                MaxLength % BrickTypes.First() == 0
                ? MaxLength / BrickTypes.First()
                : (MaxLength / BrickTypes.First() + 1);
            return new BrickRow1(maxBrickCount, MaxLength);
        }
    }
}
